.class public Lcom/noshufou/android/su/widget/AppListItem;
.super Landroid/view/ViewGroup;
.source "AppListItem.java"

# interfaces
.implements Landroid/widget/Checkable;


# instance fields
.field private mChecked:Z

.field private final mContext:Landroid/content/Context;

.field private final mGapBetweenImageAndText:I

.field private mHeaderBackgroundDrawable:Landroid/graphics/drawable/Drawable;

.field private mHeaderBackgroundHeight:I

.field private final mHeaderPaddingLeft:I

.field private mHeaderTextView:Landroid/widget/TextView;

.field private mHeaderVisible:Z

.field private mHorizontalDividerDrawable:Landroid/graphics/drawable/Drawable;

.field private mHorizontalDividerHeight:I

.field private mHorizontalDividerVisible:Z

.field private mIconView:Landroid/widget/ImageView;

.field private final mIconViewSize:I

.field private mLine1Height:I

.field private mLine2Height:I

.field private mLogTextView:Landroid/widget/TextView;

.field private mNameTextView:Landroid/widget/TextView;

.field private final mPaddingBottom:I

.field private final mPaddingLeft:I

.field private final mPaddingRight:I

.field private final mPaddingTop:I

.field private final mPreferredHeight:I

.field private mStatusButton:Landroid/widget/ImageView;


# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 2
    .parameter "context"
    .parameter "attrs"

    .prologue
    .line 69
    invoke-direct {p0, p1, p2}, Landroid/view/ViewGroup;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 50
    const/4 v1, 0x0

    iput-boolean v1, p0, Lcom/noshufou/android/su/widget/AppListItem;->mChecked:Z

    .line 70
    iput-object p1, p0, Lcom/noshufou/android/su/widget/AppListItem;->mContext:Landroid/content/Context;

    .line 72
    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    .line 74
    .local v0, resources:Landroid/content/res/Resources;
    const v1, 0x7f090005

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v1

    .line 73
    iput v1, p0, Lcom/noshufou/android/su/widget/AppListItem;->mPreferredHeight:I

    .line 76
    const v1, 0x7f090006

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v1

    .line 75
    iput v1, p0, Lcom/noshufou/android/su/widget/AppListItem;->mPaddingTop:I

    .line 78
    const v1, 0x7f090008

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v1

    .line 77
    iput v1, p0, Lcom/noshufou/android/su/widget/AppListItem;->mPaddingBottom:I

    .line 80
    const v1, 0x7f090009

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v1

    .line 79
    iput v1, p0, Lcom/noshufou/android/su/widget/AppListItem;->mPaddingLeft:I

    .line 82
    const v1, 0x7f090007

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v1

    .line 81
    iput v1, p0, Lcom/noshufou/android/su/widget/AppListItem;->mPaddingRight:I

    .line 84
    const v1, 0x7f09000a

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v1

    .line 83
    iput v1, p0, Lcom/noshufou/android/su/widget/AppListItem;->mIconViewSize:I

    .line 86
    const v1, 0x7f09000b

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v1

    .line 85
    iput v1, p0, Lcom/noshufou/android/su/widget/AppListItem;->mGapBetweenImageAndText:I

    .line 88
    const v1, 0x7f09000d

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v1

    .line 87
    iput v1, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderPaddingLeft:I

    .line 89
    return-void
.end method

.method private ensureHeaderBackground()V
    .locals 2

    .prologue
    .line 229
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderBackgroundDrawable:Landroid/graphics/drawable/Drawable;

    if-nez v0, :cond_0

    .line 230
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    .line 231
    const v1, 0x7f020004

    .line 230
    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v0

    iput-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderBackgroundDrawable:Landroid/graphics/drawable/Drawable;

    .line 232
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderBackgroundDrawable:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v0

    iput v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderBackgroundHeight:I

    .line 234
    :cond_0
    return-void
.end method

.method private ensureHorizontalDivider()V
    .locals 2

    .prologue
    .line 213
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHorizontalDividerDrawable:Landroid/graphics/drawable/Drawable;

    if-nez v0, :cond_0

    .line 214
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    .line 215
    const v1, 0x7f020003

    .line 214
    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v0

    iput-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHorizontalDividerDrawable:Landroid/graphics/drawable/Drawable;

    .line 216
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHorizontalDividerDrawable:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v0

    iput v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHorizontalDividerHeight:I

    .line 218
    :cond_0
    return-void
.end method

.method private isVisible(Landroid/view/View;)Z
    .locals 1
    .parameter "view"

    .prologue
    .line 201
    if-eqz p1, :cond_0

    invoke-virtual {p1}, Landroid/view/View;->getVisibility()I

    move-result v0

    if-nez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method


# virtual methods
.method public dispatchDraw(Landroid/graphics/Canvas;)V
    .locals 1
    .parameter "canvas"

    .prologue
    .line 238
    iget-boolean v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderVisible:Z

    if-eqz v0, :cond_0

    .line 239
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderBackgroundDrawable:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v0, p1}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V

    .line 241
    :cond_0
    iget-boolean v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHorizontalDividerVisible:Z

    if-eqz v0, :cond_1

    .line 242
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHorizontalDividerDrawable:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v0, p1}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V

    .line 244
    :cond_1
    invoke-super {p0, p1}, Landroid/view/ViewGroup;->dispatchDraw(Landroid/graphics/Canvas;)V

    .line 245
    return-void
.end method

.method public isChecked()Z
    .locals 1

    .prologue
    .line 364
    iget-boolean v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mChecked:Z

    return v0
.end method

.method protected onLayout(ZIIII)V
    .locals 15
    .parameter "changed"
    .parameter "left"
    .parameter "top"
    .parameter "right"
    .parameter "bottom"

    .prologue
    .line 128
    sub-int v2, p5, p3

    .line 129
    .local v2, height:I
    sub-int v10, p4, p2

    .line 131
    .local v10, width:I
    const/4 v8, 0x0

    .line 133
    .local v8, topBound:I
    iget-boolean v11, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderVisible:Z

    if-eqz v11, :cond_0

    .line 134
    iget-object v11, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderBackgroundDrawable:Landroid/graphics/drawable/Drawable;

    .line 135
    const/4 v12, 0x0

    .line 136
    const/4 v13, 0x0

    .line 138
    iget v14, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderBackgroundHeight:I

    .line 134
    invoke-virtual {v11, v12, v13, v10, v14}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V

    .line 139
    iget-object v11, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderTextView:Landroid/widget/TextView;

    iget v12, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderPaddingLeft:I

    const/4 v13, 0x0

    iget v14, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderBackgroundHeight:I

    invoke-virtual {v11, v12, v13, v10, v14}, Landroid/widget/TextView;->layout(IIII)V

    .line 140
    iget v11, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderBackgroundHeight:I

    add-int/2addr v8, v11

    .line 143
    :cond_0
    iget-boolean v11, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHorizontalDividerVisible:Z

    if-eqz v11, :cond_1

    .line 144
    invoke-direct {p0}, Lcom/noshufou/android/su/widget/AppListItem;->ensureHorizontalDivider()V

    .line 145
    iget-object v11, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHorizontalDividerDrawable:Landroid/graphics/drawable/Drawable;

    .line 146
    const/4 v12, 0x0

    .line 147
    iget v13, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHorizontalDividerHeight:I

    sub-int v13, v2, v13

    .line 145
    invoke-virtual {v11, v12, v13, v10, v2}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V

    .line 152
    :cond_1
    iget v4, p0, Lcom/noshufou/android/su/widget/AppListItem;->mPaddingLeft:I

    .line 153
    .local v4, leftBound:I
    move/from16 v6, p4

    .line 155
    .local v6, rightBound:I
    iget-object v11, p0, Lcom/noshufou/android/su/widget/AppListItem;->mIconView:Landroid/widget/ImageView;

    if-eqz v11, :cond_2

    .line 156
    sub-int v11, v2, v8

    iget v12, p0, Lcom/noshufou/android/su/widget/AppListItem;->mIconViewSize:I

    sub-int/2addr v11, v12

    div-int/lit8 v11, v11, 0x2

    add-int v3, v8, v11

    .line 157
    .local v3, iconTop:I
    iget-object v11, p0, Lcom/noshufou/android/su/widget/AppListItem;->mIconView:Landroid/widget/ImageView;

    .line 160
    iget v12, p0, Lcom/noshufou/android/su/widget/AppListItem;->mIconViewSize:I

    add-int/2addr v12, v4

    .line 161
    iget v13, p0, Lcom/noshufou/android/su/widget/AppListItem;->mIconViewSize:I

    add-int/2addr v13, v3

    .line 157
    invoke-virtual {v11, v4, v3, v12, v13}, Landroid/widget/ImageView;->layout(IIII)V

    .line 162
    iget v11, p0, Lcom/noshufou/android/su/widget/AppListItem;->mIconViewSize:I

    iget v12, p0, Lcom/noshufou/android/su/widget/AppListItem;->mGapBetweenImageAndText:I

    add-int/2addr v11, v12

    add-int/2addr v4, v11

    .line 165
    .end local v3           #iconTop:I
    :cond_2
    iget v11, p0, Lcom/noshufou/android/su/widget/AppListItem;->mPaddingTop:I

    add-int/2addr v8, v11

    .line 167
    iget v11, p0, Lcom/noshufou/android/su/widget/AppListItem;->mPaddingTop:I

    add-int/2addr v8, v11

    .line 168
    iget v11, p0, Lcom/noshufou/android/su/widget/AppListItem;->mPaddingBottom:I

    sub-int v0, v2, v11

    .line 169
    .local v0, bottomBound:I
    iget v11, p0, Lcom/noshufou/android/su/widget/AppListItem;->mPaddingRight:I

    sub-int/2addr v6, v11

    .line 170
    move v5, v6

    .line 172
    .local v5, line1RightBound:I
    iget v11, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLine1Height:I

    iget v12, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLine2Height:I

    add-int v9, v11, v12

    .line 173
    .local v9, totalTextHeight:I
    add-int v11, v0, v8

    sub-int/2addr v11, v9

    div-int/lit8 v7, v11, 0x2

    .line 175
    .local v7, textTopBound:I
    iget-object v11, p0, Lcom/noshufou/android/su/widget/AppListItem;->mStatusButton:Landroid/widget/ImageView;

    invoke-direct {p0, v11}, Lcom/noshufou/android/su/widget/AppListItem;->isVisible(Landroid/view/View;)Z

    move-result v11

    if-eqz v11, :cond_3

    .line 176
    iget-object v11, p0, Lcom/noshufou/android/su/widget/AppListItem;->mStatusButton:Landroid/widget/ImageView;

    invoke-virtual {v11}, Landroid/widget/ImageView;->getMeasuredWidth()I

    move-result v1

    .line 177
    .local v1, buttonWidth:I
    sub-int/2addr v5, v1

    .line 178
    iget-object v11, p0, Lcom/noshufou/android/su/widget/AppListItem;->mStatusButton:Landroid/widget/ImageView;

    .line 179
    sub-int v12, v6, v1

    .line 182
    iget v13, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLine1Height:I

    add-int/2addr v13, v7

    .line 178
    invoke-virtual {v11, v12, v7, v6, v13}, Landroid/widget/ImageView;->layout(IIII)V

    .line 185
    .end local v1           #buttonWidth:I
    :cond_3
    iget-object v11, p0, Lcom/noshufou/android/su/widget/AppListItem;->mNameTextView:Landroid/widget/TextView;

    .line 188
    iget v12, p0, Lcom/noshufou/android/su/widget/AppListItem;->mGapBetweenImageAndText:I

    sub-int v12, v5, v12

    .line 189
    iget v13, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLine1Height:I

    add-int/2addr v13, v7

    .line 185
    invoke-virtual {v11, v4, v7, v12, v13}, Landroid/widget/TextView;->layout(IIII)V

    .line 191
    iget-object v11, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLogTextView:Landroid/widget/TextView;

    invoke-direct {p0, v11}, Lcom/noshufou/android/su/widget/AppListItem;->isVisible(Landroid/view/View;)Z

    move-result v11

    if-eqz v11, :cond_4

    .line 192
    iget-object v11, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLogTextView:Landroid/widget/TextView;

    .line 194
    iget v12, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLine1Height:I

    add-int/2addr v12, v7

    .line 196
    iget v13, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLine1Height:I

    add-int/2addr v13, v7

    iget v14, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLine2Height:I

    add-int/2addr v13, v14

    .line 192
    invoke-virtual {v11, v4, v12, v6, v13}, Landroid/widget/TextView;->layout(IIII)V

    .line 198
    :cond_4
    return-void
.end method

.method protected onMeasure(II)V
    .locals 6
    .parameter "widthMeasureSpec"
    .parameter "heightMeasureSpec"

    .prologue
    const/high16 v5, 0x4000

    const/4 v4, 0x0

    .line 93
    invoke-static {v4, p1}, Lcom/noshufou/android/su/widget/AppListItem;->resolveSize(II)I

    move-result v1

    .line 94
    .local v1, width:I
    const/4 v0, 0x0

    .line 96
    .local v0, height:I
    iput v4, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLine1Height:I

    .line 97
    iput v4, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLine2Height:I

    .line 99
    iget-object v2, p0, Lcom/noshufou/android/su/widget/AppListItem;->mNameTextView:Landroid/widget/TextView;

    invoke-virtual {v2, v4, v4}, Landroid/widget/TextView;->measure(II)V

    .line 100
    iget-object v2, p0, Lcom/noshufou/android/su/widget/AppListItem;->mNameTextView:Landroid/widget/TextView;

    invoke-virtual {v2}, Landroid/widget/TextView;->getMeasuredHeight()I

    move-result v2

    iput v2, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLine1Height:I

    .line 102
    iget-object v2, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLogTextView:Landroid/widget/TextView;

    invoke-direct {p0, v2}, Lcom/noshufou/android/su/widget/AppListItem;->isVisible(Landroid/view/View;)Z

    move-result v2

    if-eqz v2, :cond_0

    .line 103
    iget-object v2, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLogTextView:Landroid/widget/TextView;

    invoke-virtual {v2, v4, v4}, Landroid/widget/TextView;->measure(II)V

    .line 104
    iget-object v2, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLogTextView:Landroid/widget/TextView;

    invoke-virtual {v2}, Landroid/widget/TextView;->getMeasuredHeight()I

    move-result v2

    iput v2, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLine2Height:I

    .line 107
    :cond_0
    iget v2, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLine1Height:I

    iget v3, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLine2Height:I

    add-int/2addr v2, v3

    add-int/2addr v0, v2

    .line 109
    iget-object v2, p0, Lcom/noshufou/android/su/widget/AppListItem;->mStatusButton:Landroid/widget/ImageView;

    invoke-direct {p0, v2}, Lcom/noshufou/android/su/widget/AppListItem;->isVisible(Landroid/view/View;)Z

    move-result v2

    if-eqz v2, :cond_1

    .line 110
    iget-object v2, p0, Lcom/noshufou/android/su/widget/AppListItem;->mStatusButton:Landroid/widget/ImageView;

    invoke-virtual {v2, v4, v4}, Landroid/widget/ImageView;->measure(II)V

    .line 113
    :cond_1
    iget v2, p0, Lcom/noshufou/android/su/widget/AppListItem;->mPreferredHeight:I

    invoke-static {v0, v2}, Ljava/lang/Math;->max(II)I

    move-result v0

    .line 115
    iget-boolean v2, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderVisible:Z

    if-eqz v2, :cond_2

    .line 116
    invoke-direct {p0}, Lcom/noshufou/android/su/widget/AppListItem;->ensureHeaderBackground()V

    .line 117
    iget-object v2, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderTextView:Landroid/widget/TextView;

    .line 118
    invoke-static {v1, v5}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v3

    .line 119
    iget v4, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderBackgroundHeight:I

    invoke-static {v4, v5}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v4

    .line 117
    invoke-virtual {v2, v3, v4}, Landroid/widget/TextView;->measure(II)V

    .line 120
    iget-object v2, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderBackgroundDrawable:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v2}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v2

    add-int/2addr v0, v2

    .line 123
    :cond_2
    invoke-virtual {p0, v1, v0}, Lcom/noshufou/android/su/widget/AppListItem;->setMeasuredDimension(II)V

    .line 124
    return-void
.end method

.method public setAppIcon(Landroid/graphics/drawable/Drawable;)V
    .locals 2
    .parameter "icon"

    .prologue
    .line 327
    if-eqz p1, :cond_2

    .line 328
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mIconView:Landroid/widget/ImageView;

    if-nez v0, :cond_0

    .line 329
    new-instance v0, Landroid/widget/ImageView;

    iget-object v1, p0, Lcom/noshufou/android/su/widget/AppListItem;->mContext:Landroid/content/Context;

    invoke-direct {v0, v1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mIconView:Landroid/widget/ImageView;

    .line 330
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mIconView:Landroid/widget/ImageView;

    invoke-virtual {p0, v0}, Lcom/noshufou/android/su/widget/AppListItem;->addView(Landroid/view/View;)V

    .line 332
    :cond_0
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mIconView:Landroid/widget/ImageView;

    invoke-virtual {v0, p1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 333
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mIconView:Landroid/widget/ImageView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 339
    :cond_1
    :goto_0
    return-void

    .line 335
    :cond_2
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mIconView:Landroid/widget/ImageView;

    if-eqz v0, :cond_1

    .line 336
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mIconView:Landroid/widget/ImageView;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    goto :goto_0
.end method

.method public setChecked(Z)V
    .locals 1
    .parameter "checked"

    .prologue
    .line 369
    iput-boolean p1, p0, Lcom/noshufou/android/su/widget/AppListItem;->mChecked:Z

    .line 370
    if-eqz p1, :cond_0

    const v0, 0x7f020024

    :goto_0
    invoke-virtual {p0, v0}, Lcom/noshufou/android/su/widget/AppListItem;->setBackgroundResource(I)V

    .line 371
    return-void

    .line 370
    :cond_0
    const v0, 0x106000d

    goto :goto_0
.end method

.method public setDividerVisible(Z)V
    .locals 0
    .parameter "visible"

    .prologue
    .line 252
    iput-boolean p1, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHorizontalDividerVisible:Z

    .line 253
    return-void
.end method

.method public setHeaderBackground(I)V
    .locals 1
    .parameter "res"

    .prologue
    .line 221
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    invoke-virtual {v0, p1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v0

    iput-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderBackgroundDrawable:Landroid/graphics/drawable/Drawable;

    .line 222
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderBackgroundDrawable:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v0

    iput v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderBackgroundHeight:I

    .line 223
    return-void
.end method

.method public setHorizontalDivider(I)V
    .locals 1
    .parameter "res"

    .prologue
    .line 205
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    invoke-virtual {v0, p1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v0

    iput-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHorizontalDividerDrawable:Landroid/graphics/drawable/Drawable;

    .line 206
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHorizontalDividerDrawable:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v0

    iput v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHorizontalDividerHeight:I

    .line 207
    return-void
.end method

.method public setLogText(Ljava/lang/CharSequence;)V
    .locals 3
    .parameter "text"

    .prologue
    .line 306
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_2

    .line 307
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLogTextView:Landroid/widget/TextView;

    if-nez v0, :cond_0

    .line 308
    new-instance v0, Landroid/widget/TextView;

    iget-object v1, p0, Lcom/noshufou/android/su/widget/AppListItem;->mContext:Landroid/content/Context;

    invoke-direct {v0, v1}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLogTextView:Landroid/widget/TextView;

    .line 309
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLogTextView:Landroid/widget/TextView;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setSingleLine(Z)V

    .line 310
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLogTextView:Landroid/widget/TextView;

    sget-object v1, Landroid/text/TextUtils$TruncateAt;->END:Landroid/text/TextUtils$TruncateAt;

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setEllipsize(Landroid/text/TextUtils$TruncateAt;)V

    .line 311
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLogTextView:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/noshufou/android/su/widget/AppListItem;->mContext:Landroid/content/Context;

    const v2, 0x1030046

    invoke-virtual {v0, v1, v2}, Landroid/widget/TextView;->setTextAppearance(Landroid/content/Context;I)V

    .line 312
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLogTextView:Landroid/widget/TextView;

    invoke-virtual {p0, v0}, Lcom/noshufou/android/su/widget/AppListItem;->addView(Landroid/view/View;)V

    .line 314
    :cond_0
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLogTextView:Landroid/widget/TextView;

    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 315
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLogTextView:Landroid/widget/TextView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V

    .line 321
    :cond_1
    :goto_0
    return-void

    .line 317
    :cond_2
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLogTextView:Landroid/widget/TextView;

    if-eqz v0, :cond_1

    .line 318
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mLogTextView:Landroid/widget/TextView;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V

    goto :goto_0
.end method

.method public setNameText(Ljava/lang/CharSequence;)V
    .locals 3
    .parameter "text"

    .prologue
    .line 284
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_2

    .line 285
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mNameTextView:Landroid/widget/TextView;

    if-nez v0, :cond_0

    .line 286
    new-instance v0, Landroid/widget/TextView;

    iget-object v1, p0, Lcom/noshufou/android/su/widget/AppListItem;->mContext:Landroid/content/Context;

    invoke-direct {v0, v1}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mNameTextView:Landroid/widget/TextView;

    .line 287
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mNameTextView:Landroid/widget/TextView;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setSingleLine(Z)V

    .line 288
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mNameTextView:Landroid/widget/TextView;

    sget-object v1, Landroid/text/TextUtils$TruncateAt;->END:Landroid/text/TextUtils$TruncateAt;

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setEllipsize(Landroid/text/TextUtils$TruncateAt;)V

    .line 289
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mNameTextView:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/noshufou/android/su/widget/AppListItem;->mContext:Landroid/content/Context;

    const v2, 0x1030042

    invoke-virtual {v0, v1, v2}, Landroid/widget/TextView;->setTextAppearance(Landroid/content/Context;I)V

    .line 290
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mNameTextView:Landroid/widget/TextView;

    const/16 v1, 0x10

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setGravity(I)V

    .line 291
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mNameTextView:Landroid/widget/TextView;

    invoke-virtual {p0, v0}, Lcom/noshufou/android/su/widget/AppListItem;->addView(Landroid/view/View;)V

    .line 293
    :cond_0
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mNameTextView:Landroid/widget/TextView;

    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 294
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mNameTextView:Landroid/widget/TextView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V

    .line 300
    :cond_1
    :goto_0
    return-void

    .line 296
    :cond_2
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mNameTextView:Landroid/widget/TextView;

    if-eqz v0, :cond_1

    .line 297
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mNameTextView:Landroid/widget/TextView;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V

    goto :goto_0
.end method

.method public setSectionHeader(Ljava/lang/String;)V
    .locals 5
    .parameter "title"

    .prologue
    const/4 v4, 0x1

    const/4 v3, 0x0

    .line 259
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_1

    .line 260
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderTextView:Landroid/widget/TextView;

    if-nez v0, :cond_0

    .line 261
    new-instance v0, Landroid/widget/TextView;

    iget-object v1, p0, Lcom/noshufou/android/su/widget/AppListItem;->mContext:Landroid/content/Context;

    invoke-direct {v0, v1}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderTextView:Landroid/widget/TextView;

    .line 262
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderTextView:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderTextView:Landroid/widget/TextView;

    invoke-virtual {v1}, Landroid/widget/TextView;->getTypeface()Landroid/graphics/Typeface;

    move-result-object v1

    invoke-virtual {v0, v1, v4}, Landroid/widget/TextView;->setTypeface(Landroid/graphics/Typeface;I)V

    .line 263
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderTextView:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/noshufou/android/su/widget/AppListItem;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    .line 264
    const v2, 0x7f080004

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getColor(I)I

    move-result v1

    .line 263
    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V

    .line 265
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderTextView:Landroid/widget/TextView;

    const/high16 v1, 0x4160

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextSize(F)V

    .line 266
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderTextView:Landroid/widget/TextView;

    const/16 v1, 0x13

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setGravity(I)V

    .line 267
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderTextView:Landroid/widget/TextView;

    invoke-virtual {p0, v0}, Lcom/noshufou/android/su/widget/AppListItem;->addView(Landroid/view/View;)V

    .line 269
    :cond_0
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderTextView:Landroid/widget/TextView;

    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 270
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderTextView:Landroid/widget/TextView;

    invoke-virtual {v0, v3}, Landroid/widget/TextView;->setVisibility(I)V

    .line 271
    iput-boolean v4, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderVisible:Z

    .line 278
    :goto_0
    return-void

    .line 273
    :cond_1
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderTextView:Landroid/widget/TextView;

    if-eqz v0, :cond_2

    .line 274
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderTextView:Landroid/widget/TextView;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V

    .line 276
    :cond_2
    iput-boolean v3, p0, Lcom/noshufou/android/su/widget/AppListItem;->mHeaderVisible:Z

    goto :goto_0
.end method

.method public setStatusButton(Landroid/graphics/drawable/Drawable;IJ)V
    .locals 2
    .parameter "icon"
    .parameter "id"
    .parameter "appId"

    .prologue
    .line 345
    if-eqz p1, :cond_2

    .line 346
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mStatusButton:Landroid/widget/ImageView;

    if-nez v0, :cond_0

    .line 347
    new-instance v0, Landroid/widget/ImageView;

    iget-object v1, p0, Lcom/noshufou/android/su/widget/AppListItem;->mContext:Landroid/content/Context;

    invoke-direct {v0, v1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mStatusButton:Landroid/widget/ImageView;

    .line 348
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mStatusButton:Landroid/widget/ImageView;

    invoke-virtual {v0, p2}, Landroid/widget/ImageView;->setId(I)V

    .line 349
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mStatusButton:Landroid/widget/ImageView;

    sget-object v1, Landroid/widget/ImageView$ScaleType;->CENTER:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    .line 350
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mStatusButton:Landroid/widget/ImageView;

    invoke-virtual {p0, v0}, Lcom/noshufou/android/su/widget/AppListItem;->addView(Landroid/view/View;)V

    .line 352
    :cond_0
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mStatusButton:Landroid/widget/ImageView;

    invoke-virtual {v0, p1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 353
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mStatusButton:Landroid/widget/ImageView;

    invoke-static {p3, p4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setTag(Ljava/lang/Object;)V

    .line 354
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mStatusButton:Landroid/widget/ImageView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 360
    :cond_1
    :goto_0
    return-void

    .line 356
    :cond_2
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mStatusButton:Landroid/widget/ImageView;

    if-eqz v0, :cond_1

    .line 357
    iget-object v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mStatusButton:Landroid/widget/ImageView;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    goto :goto_0
.end method

.method public toggle()V
    .locals 1

    .prologue
    .line 375
    iget-boolean v0, p0, Lcom/noshufou/android/su/widget/AppListItem;->mChecked:Z

    if-eqz v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    invoke-virtual {p0, v0}, Lcom/noshufou/android/su/widget/AppListItem;->setChecked(Z)V

    .line 376
    return-void

    .line 375
    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method
